import request from '@/utils/request'

enum API {
  // 获取所有反馈
  GETALLFEEDBACK_URL = '/admin/feedback/getAll/',
  // 更新反馈回复
  UPDATE_FEEDBACK_ANSWER_URL = '/admin/feedback/updateAnswer',
}

// 获取所有反馈
export const reqGetAllFeedback = (
  page: number,
  limit: number,
  type: number | null,
) => {
  return request.get<any, any>(
    API.GETALLFEEDBACK_URL + `${page}/${limit}/${type}`,
  )
}

// 更新反馈回复
export const reqUpdateFeedbackAnswer = (data: any) => {
  return request.put<any, any>(API.UPDATE_FEEDBACK_ANSWER_URL, data)
}
